package com.fancy.net.stream.login
{
	import com.fancy.net.stream.EncodeBase;
	
	import flash.utils.ByteArray;
	
	public class LoginReq extends EncodeBase
	{
		public static const MSG_ID:String = "0103";
		
		public function LoginReq()
		{
			super();
		}
		
		override public function getMsgId():String { return MSG_ID; }
		
		override public function getBytes(vo:Object):ByteArray
		{
			var bytes:ByteArray = new ByteArray();
			bytes.writeByte(0x01);
			bytes.writeByte(0x03);
			bytes.writeMultiByte(vo["account"], "gb2312");
			bytes.writeByte(0);
			bytes.writeMultiByte(vo["pwd"], "gb2312");
			bytes.writeByte(0);
			return bytes;
		}
		
	}
}